<%--
  Created by IntelliJ IDEA.
  User: 86182
  Date: 2023/9/28
  Time: 19:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>个人注册</title>
    <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="css/register.css">
    <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
</head>
<body onload="validateInputs()">
<canvas></canvas>
<img src="images/background/registerbag.jpg" alt="" class="loginleft">
<div class="floating-div">
    <div class="register-container">
        <form action="registerToMysql" method="post">
            <input type="hidden" name="action" value="userRegister">
            <a href="" class="registerfont">个人账户注册</a><br>
            <input type="text" placeholder="请输入您的帐号" class="ipo" name="ipo"><br>
            <input type="password" placeholder="请输入您的密码" class="ipt" name="ipt"><br>
            <br>
            <button id="btn" disabled>注册</button>
        </form>
        <form id="emailForm" action="EmailServlet" method="post">
            <input type="hidden" name="action" value="userSendEmail">
            <input type="email" class="email" name="toEmail" placeholder="请输入您的邮箱" required>
            <input type="text" placeholder="请输入验证码" class="testword" name="testwor"><br>
            <button type="submit" value="发送验证码" class="sendemail" disabled>发送验证码</button>
        </form>
        <%
            String message = (String) request.getAttribute("message");
            if (message != null && !message.isEmpty()) {
        %>
        <div style="color: red;"><%= message %></div>
        <%
            }
        %>
    </div>
</div>
<script src="js/register.js"></script>
<script src="js/canvas.js"></script>
</body>
</html>
